autogen.sh: Improve the script a bit
authorJavier Jardón <jjardon@gnome.org>
Tue, 18 Oct 2011 16:35:19 +0000 (17:35 +0100)
committerJavier Jardón <jjardon@gnome.org>
Tue, 18 Oct 2011 16:35:55 +0000 (17:35 +0100)
Fix builddir != sourcedir issues ans also run ./configure if
Its needed

autogen.sh

index 0b51c5c2363e755fd14e24cfb8e9abe912576a4d..6035bc02934c09acecb11245d19aaa569e1dc60f 100755 (executable)
@@ -1,5 +1,20 @@
 #!/bin/sh
 
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
+
+olddir=`pwd`
+cd $srcdir
+
+AUTORECONF=`which autoreconf`
+if test -z $AUTORECONF; then
+        echo "*** No autoreconf found, please intall it ***"
+        exit 1
+fi
+
 mkdir -p m4
 
-exec autoreconf -vfi
+autoreconf --force --install --verbose
+
+cd $olddir
+test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"